package testJdk.commonUse.number;

import cn.hutool.core.util.NumberUtil;
import org.junit.Test;

import java.math.BigDecimal;
import java.math.RoundingMode;

/**
 * @version 1.0.0
 * Created by cyd on 2022-09-09 10:24:46
 * @ClassName : learn_jdk.commonUse.number.TestMul
 * @Description : 类描述
 */
public class TestMul {

    @Test
    public void test() {
        Long weekData = 1L;
        Long lastWeekData = 3L;
        Long div = weekData - lastWeekData;
        BigDecimal decimal = NumberUtil.div(div, lastWeekData);
        BigDecimal bigDecimal = decimal.setScale(2, RoundingMode.HALF_UP);
        BigDecimal mul = NumberUtil.mul(bigDecimal, 100);
        String s1 = mul.toString();
        System.out.println(s1);
    }
}
